package com.haelth.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;

import com.haelth.control.ChahwaGetQuery;

import java.awt.Window.Type;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class MainWindow extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainWindow frame = new MainWindow();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public MainWindow() {
		setResizable(false);
		setTitle("愛買地查詢");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 196, 247);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnNewButton = new JButton("健保");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				HealthMainFrame window = new HealthMainFrame();
			}
		});
		btnNewButton.setFont(new Font("新細明體", Font.PLAIN, 24));
		btnNewButton.setBounds(36, 29, 111, 31);
		contentPane.add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("嘉鏵");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ChahwaQuery query = new ChahwaQuery();
			}
		});
		btnNewButton_1.setFont(new Font("新細明體", Font.PLAIN, 24));
		btnNewButton_1.setBounds(36, 75, 111, 31);
		contentPane.add(btnNewButton_1);
		
		JButton button = new JButton("離開");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
		button.setFont(new Font("新細明體", Font.PLAIN, 24));
		button.setBounds(36, 121, 111, 31);
		contentPane.add(button);
	}
}
